/**
 ----------------------
 1.当前文件用于编辑表单
 2.提供表单相关属性
 3. @param xxxFormConfig.current 指向当前选中的数据
 ----------------------
 */
import type {AxMemo} from '@/api/modules/ax/memo/types';
import type {Rule} from 'ant-design-vue/es/form/interface';
import {useAxForm} from '@/utils/common/hooks';

const memoFormObj: AxMemo = {
        memoId: 0 ,
        title: "" ,
        value: "" ,
        description: "" ,
        extra: "" ,
        userId: 0 ,
        type: "" ,
        deptId: 0 ,
        createTime: null ,
        updateTime: null ,
};

// 表格校验
export const memoRules: Record<string, Rule[]> = {
    title: [{required: false , trigger: 'change'}],
    value: [{required: false , trigger: 'change'}],
    description: [{required: false , trigger: 'change'}],
    extra: [{required: false , trigger: 'change'}],
    userId: [{required: false , trigger: 'change'}],
    type: [{required: false , trigger: 'change'}],
};
export const memoFormConfig = useAxForm<AxMemo>(memoFormObj);
export const memoFormRef = ref()